﻿using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERP.Abp.AntDesignUI.Exssions
{
    public static class StringExsion
    {
        public static string QueryString(this string Url, string name)
        {
            string uri = Url;
            var idx = uri.IndexOf("?");
            if (idx > 0)
            {
                var arry = uri.Substring(idx + 1).Split("&");
                if (arry.Length > 0)
                {
                    for (var i = 0; i < arry.Length; i++)
                    {
                        var ar = arry[i].Split("=");
                        if (ar.Length == 2 && ar[0] == name)
                        {
                            return ar[1];
                        }
                    }
                }
            }
            return null;
        }
    }

}
